package descriptor;

import java.io.Serializable;
import java.util.Vector;

public class DegreeListDescriptor implements Serializable {
private Vector<DegreeDescriptor> degreeList;
	
	public DegreeListDescriptor(){
		degreeList = new Vector<DegreeDescriptor>();
	}
	
	public DegreeListDescriptor(Vector<DegreeDescriptor> list){
		degreeList = new Vector<DegreeDescriptor>(list);
	}
	
	public void addDegree(DegreeDescriptor category){
		degreeList.add(category);
	}

	public Vector<DegreeDescriptor> getDegreeList() {
		return degreeList;
	}
	
	
	// a ameliorer !! :d
	public String getDegreeName(int id){
		
		String name = "";
		for (int i = 0; i < degreeList.size(); i++){
			if(degreeList.elementAt(i).id == id){
				name = degreeList.elementAt(i).getName();
			}
		}
		return name;
	}
}
